﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FarseerGames.FarseerPhysics;
using FarseerGames.FarseerPhysics.Factories;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XNA_2DFramwork
{
    public class Enemy:Entity
    {
        public Enemy(Game Game, Vector2 position,int width, int height, string filename, GraphicsDevice gd, PhysicsSimulator physicsSimulator) : base(Game, position,width,height, filename, gd, physicsSimulator)
        {
            PhysicsSimulator = physicsSimulator;
            Position = position;
            //---------------------------------------------------------------------------------------
            Texture = Game.Content.Load<Texture2D>(filename);
            
            Width = width;
            Height = height;
            Origin = new Vector2(Width / 2f, Height / 2f);
            SpriteBatch = new SpriteBatch(gd);
            Body = BodyFactory.Instance.CreateRectangleBody(PhysicsSimulator, Width, Height, 1);
            Body.Position = Position;
            Geom = GeomFactory.Instance.CreateRectangleGeom(PhysicsSimulator, Body, Width, Height);
            Geom.FrictionCoefficient = 1;
        }
        public int Life
        {
            get
            {
                return Life;
            }
            set
            {

            }
        }

        public int Power
        {
            get
            {
                return Power;
            }
            set
            {

            }
        }

        public bool InGoal()
        {
            return true;
        }

        public void IsDead()
        {

        }

        public void Shoot()
        {

        }
    }
}
